﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="generalAccountBox.ascx.cs" Inherits="VISS.Web.Frontend.Modules.User.Profile.GeneralAccountBoxControl" %>

<%@ Import Namespace="VISS.Web.Frontend" %>
<%@ Import Namespace="NCT.Framework" %>
<%@ Import Namespace="VISS.API.Users" %>

<div id="account-box" class="form">
    <div class="field"><span class="fullname" id="FullName"><%=FullName %></span></div>
    <div class="field"><span class="bold">Giới tính: </span><span id="Sex"> 
    <% if (Gender == EUserGender.Male) { %>
        Nam
    <% } %>
    <% else { %>
        Nữ
    <% } %>
    </span></div>
    <div class="field"><span class="bold">Tuổi: </span><span id="Age"><%=Age %></span></div>
    <div class="field"><span class="bold">Nơi ở: </span><span id="City"><%=City %></span></div>
    <%--<div class="field"><span class="bold">Tin tưởng: </span><span> <%=Trust %></span></div>--%>
    <div class="field"><span class="bold">Được quan tâm: </span>
        <% if (IsEditGeneral) { %>
            <span><a href="javascript:void(0);" onclick="ChangeInterestViewType(null);"><%=Interest %> người</a></span>
        <% }
           else { %>
            <span><%=Interest %> người</span>
        <% } %>
    </div>
    <div class="field"><span class="bold">Online: </span>
        <% if (LastLogin > DateTimeUtils.MinValue) { %>
           <span class="timeago" title="<%=LastLogin %>"></span>
        <% }
           else { %>
           <span>Chưa lần nào</span>
        <% } %>
    </div>
    <div class="field"><span class="bold">Số Điểm: </span>
       <%=CountPoint%>
    </div>
    <% if (IsEditGeneral) { %>
           <div class="field-edit"><span id="edit-general" class="edit-box">Chỉnh sửa</span></div>
    <% } %>
</div>
<% if (IsEditGeneral) { %>
    <div id="account-box-edit" class="form">
        <div id="account-box-edit-fields">
            <div class="field">
                <label class="title">Họ tên: </label><input title="Vui lòng sử dụng tên thật của bạn" type="text" value="<%=FullName %>" class="input input-fullname required checkEditFullName minlength" id="EditFullName" name="EditFullName" maxlength="100" <% if (!CanEditFullName) { Response.Write("disabled=\"disabled\""); } %>/>
            </div>
            <div class="field">
            <label class="title required">Giới tính: </label>
            <% if (Gender == EUserGender.Male) { %>
               <input type="radio" name="EditSex" id="EditSexMale" value="<%=(int)EUserGender.Male %>" checked="checked" /> <label for="EditSexMale" class="sex-label">Nam</label>&nbsp&nbsp
               <input type="radio" name="EditSex" id="EditSexFemale" value="<%=(int)EUserGender.Female %>" /> <label for="EditSexFemale" class="sex-label">Nữ</label>
            <% }
               else { %>
               <input type="radio" name="EditSex" id="EditSexMale" value="<%=(int)EUserGender.Male %>" /> <label for="EditSexMale" class="sex-label">Nam</label>
               <input type="radio" name="EditSex" id="EditSexFemale" value="<%=(int)EUserGender.Female %>" checked="checked" /> <label for="EditSexFemale" class="sex-label">Nữ</label>
            <% } %>
            </div>
            <div class="field"><label class="title">Ngày sinh: </label><input type="text" class="input input-birthday date-pick required" title="Định dạng: Ngày / Tháng / Năm" value="<%=string.Format("{0:dd/MM/yyyy}", BirthDate) %>" name="EditBirthday" id="EditBirthday"/></div>
            <div class="field"><label class="title">Nơi ở: </label><select id="EditCity" name="EditCity" class="select select-city required"><%=SelectCtrlBuilder.ToSlCities(CityID)%></select></div>
        </div>
        <div class="field-edit">
                <span id="cancel-general" class="cancel-general">Hủy</span> <span id="save-general" class="save-general">Cập nhật</span>
        </div>
    </div>
<% } %>